package com.sc.nft.dao;

import lombok.extern.slf4j.Slf4j;
import com.sc.nft.entity.LlUserExt;
import com.sc.nft.mapper.LlUserExtMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

/**
 * 连连用户信息表(sc_ll_user_ext)数据DAO
 *
 * @author zxy
 * @since 2023-06-28 17:01:36
 */
@Slf4j
@Repository
public class LlUserExtDao extends ServiceImpl<LlUserExtMapper, LlUserExt> {

    public LlUserExt getByUserId(Long userId) {
        return lambdaQuery().eq(LlUserExt::getUserId, userId).one();
    }

    public LlUserExt getBySeqNo(String seqNo) {
        return lambdaQuery().eq(LlUserExt::getSeqNo, seqNo).one();
    }

    public LlUserExt getValidByUserId(Long userId) {
        return lambdaQuery().eq(LlUserExt::getUserId, userId).eq(LlUserExt::getStatus, 2).one();
    }
}